package com.taiyo.modules.sys.entity;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.taiyo.common.validator.group.AddGroup;
import com.taiyo.common.validator.group.UpdateGroup;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 系统用户
 */
public class SysUserEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 用户ID
	 */
	@JsonInclude(Include.NON_NULL)
	private Long userId;

	/**
	 * 账号
	 */
	@NotBlank(message="账号不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@JsonInclude(Include.NON_NULL)
	private String account;
	/**
	 * 用户名
	 */
	@NotBlank(message="用户名不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@JsonInclude(Include.NON_NULL)
	private String username;

	/**
	 * 密码
	 */
	@NotBlank(message="密码不能为空", groups = AddGroup.class)
	@JsonInclude(Include.NON_NULL)
	private String password;

	/**
	 * 盐
	 */
	@JsonInclude(Include.NON_NULL)
	private String salt;

	/**
	 * 邮箱
	 */
	@NotBlank(message="邮箱不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Email(message="邮箱格式不正确", groups = {AddGroup.class, UpdateGroup.class})
	@JsonInclude(Include.NON_NULL)
	private String email;

	/**
	 * 性别  0：男   1：女
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer sex;
	/**
	 * 手机号
	 */
	@JsonInclude(Include.NON_NULL)
	private String mobile;

	/**
	 * 状态  0：禁用   1：正常
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer status;
	
	/**
	 * 角色ID列表
	 */
	@JsonInclude(Include.NON_NULL)
	private List<Long> roleIdList;
	
	/**
	 * 创建者ID
	 */
	@JsonInclude(Include.NON_NULL)
	private Long createUserId;

	/**
	 * 创建时间
	 */
	@JsonInclude(Include.NON_NULL)
	private Date createTime;

	/**
	 * 部门ID
	 */
	@NotNull(message="部门不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@JsonInclude(Include.NON_NULL)
	private Long deptId;

	//是否认证
	@JsonInclude(Include.NON_NULL)
	private Long auth;
	
	//生日
	@JsonInclude(Include.NON_NULL)
	private String birthday;
	
	//身份证
	@JsonInclude(Include.NON_NULL)
	private String card;
	
	//头像
	@JsonInclude(Include.NON_NULL)
	private String photos;
	
	//专业度
	@JsonInclude(Include.NON_NULL)
	private long major;
	
	//诚信度
	@JsonInclude(Include.NON_NULL)
	private long integrity;
	/**
	 * 部门名称
	 */
	@JsonInclude(Include.NON_NULL)
	private String deptName;

	/**
	 * 设置：
	 * @param userId 
	 */
	
	public void setUserId(Long userId) {
		this.userId = userId;
	}

	/**
	 * 获取：
	 * @return Long
	 */
	public Long getUserId() {
		return userId;
	}
	
	/**
	 * 设置：用户名
	 * @param username 用户名
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * 获取：用户名
	 * @return String
	 */
	public String getUsername() {
		return username;
	}
	
	/**
	 * 设置：密码
	 * @param password 密码
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 获取：密码
	 * @return String
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * 设置：邮箱
	 * @param email 邮箱
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * 获取：邮箱
	 * @return String
	 */
	public String getEmail() {
		return email;
	}
	
	/**
	 * 设置：手机号
	 * @param mobile 手机号
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * 获取：手机号
	 * @return String
	 */
	public String getMobile() {
		return mobile;
	}
	
	/**
	 * 设置：状态  0：禁用   1：正常
	 * @param status 状态  0：禁用   1：正常
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * 获取：状态  0：禁用   1：正常
	 * @return Integer
	 */
	public Integer getStatus() {
		return status;
	}
	
	/**
	 * 设置：创建时间
	 * @param createTime 创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 获取：创建时间
	 * @return Date
	 */
	public Date getCreateTime() {
		return createTime;
	}

	public List<Long> getRoleIdList() {
		return roleIdList;
	}

	public void setRoleIdList(List<Long> roleIdList) {
		this.roleIdList = roleIdList;
	}

	public Long getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public Long getDeptId() {
		return deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public Long getAuth() {
		return auth;
	}

	public void setAuth(Long auth) {
		this.auth = auth;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getCard() {
		return card;
	}

	public void setCard(String card) {
		this.card = card;
	}

	public String getPhotos() {
		return photos;
	}

	public void setPhotos(String photos) {
		this.photos = photos;
	}

	public long getMajor() {
		return major;
	}

	public void setMajor(long major) {
		this.major = major;
	}

	public long getIntegrity() {
		return integrity;
	}

	public void setIntegrity(long integrity) {
		this.integrity = integrity;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}
	
	
}
